package com.jt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author 刘昱江
 * 时间 2021/2/2
 */
public interface UserMapper extends BaseMapper<User> {
    /**
     *  如果Sql语句比较简单,可以通过直接注解开发.
     *     @Select("Sql!!!!!")
     *     @Insert("sql")
     *     @Update("sql")
     *     @Delete("sql")
     * @param start
     * @param size
     * @return
     */
    @Select("select * from user limit #{start},#{size}")
    List<User> findUserListByPage(Integer start, Integer size);
}
